1. Field of the Invention
Embodiments of the present invention generally relate to depth map generation and, more particularly, to a method and apparatus for generating a dense depth map using an adaptive, joint bilateral filter.
2. Description of the Related Art
Generally bilateral filters are used in image processing to provide edge-preserving smoothing of an image. Bilateral filters provide both domain and range filtering of images to smooth image content, yet maintain the edges of objects within the image. However, since bilateral filtering involves updating pixel values by estimating a weighted sum of pixel values over a large neighborhood of pixels, such filtering requires substantial computational resources and long periods of time to complete the calculations.
Further, a depth map represents depth in an image relative to a given focal plane. The focal plane is typically located upon the main subject of the image, but the plane (i.e., a reference plane when arbitrarily chosen) can be located at any arbitrary position within a scene. The depth map then represents object distance relative to the plane as a positive or negative value, with the magnitude of the value representing distance from the plane and the sign representing whether the object is in front of or behind the reference plane. Depth maps are typically created using ranging techniques such as laser or ultrasonic range finders as well as imaging techniques such as parallax processing. Depth maps may be enhanced using joint bilateral filtering. The goal of joint bilateral filtering is to both remove anomalous depth values through smoothing of depth values in flat areas and to improve the spatial resolution and depth resolution of the depth map. Generally bilateral filtering is slow and existing methods to optimize the processing utilize significant additional memory, or utilize approximations that may produce erroneous results.
Some image processing techniques utilize depth maps to enhance the image processing results. For example, depth maps are useful in foreground/background decomposition, face recognition, object tracking and the like. The depth map provides depth information that can be used to decompose an image into constituent components related to their depth within the image. However, using a low resolution depth map for image processing results in significant loss of quality and accuracy in the processing.
Accordingly, there exists a need for a method and apparatus for efficiently generating a dense depth map.